import request from "@/utils/request";
import { AxiosPromise } from "axios";
import { FriendDeptVO, FriendDeptForm, FriendDeptQuery } from "@/api/budget/friendDept/types";

/**
 * 查询用友部门列表
 * @param query
 * @returns {*}
 */

export const listFriendDept = (query?: FriendDeptQuery): AxiosPromise<FriendDeptVO[]> => {
  return request({
    url: "/budget/dept/list",
    method: "get",
    params: query
  });
};
/**
 * 更新后新增用友部门列表
 */
export const listNewFriendDept = () => {
  return request({
    url: "/budget/dept/listNew",
    method: "get"
  });
};

/**
 * 部门对照用友弹窗列表
 */
export const listFriendDeptPage = (query?: FriendDeptQuery) => {
  return request({
    url: "/budget/dept/listPage",
    method: "post",
    data: query
  });
};
